package com.burgeon.backend.SHOP.controller;


import com.burgeon.backend.SHOP.service.APPRechargerService;
import com.burgeon.backend.stsutil.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;
import java.util.HashMap;

@RequestMapping("shop/recharge")
@RestController
public class AppRechargeController extends BaseController{
    @Autowired
    private APPRechargerService appRechargerService;

    @RequestMapping("data")
    public ResponseResult<HashMap> Data(HttpSession session) {
        String token = session.getAttribute("token").toString();
        String phone = session.getAttribute("phone").toString();
        HashMap data = appRechargerService.findDataByVip(phone, token);
        return new ResponseResult<HashMap>(SUCCESS,data);
    }


}
